﻿using Ninject.Modules;
using SmarterCharger.App.Infrastructure;
using SmarterCharger.App.Infrastructure.Interfaces;
using SmarterCharger.App.ViewModel;

namespace SmarterCharger.App
{
    public class AppModule : NinjectModule
    {
        public override void Load()
        {
            LoadInfrastructure();
            LoadViewModels();
        }

        private void LoadInfrastructure()
        {
            Bind<INavigationService>().To<NavigationServiceWrapper>().InSingletonScope();
            Bind<IMessageBoxService>().To<MessageBoxService>().InSingletonScope();
            Bind<IBackgroundAgentStarter>().To<BackgroundAgentStarter>().InSingletonScope();
        }

        private void LoadViewModels()
        {
            Bind<FirstTimeUserViewModel>().ToSelf().InSingletonScope();
            Bind<StartChargingBatteryViewModel>().ToSelf().InSingletonScope();
            Bind<EditSettingsViewModel>().ToSelf().InSingletonScope();
        }
    }
}
